<!--
@license
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<link rel="import" href="polymer-mini.html">

<link rel="import" href="src/standard/annotations.html">
<link rel="import" href="src/standard/events.html">
<link rel="import" href="src/standard/gestures.html">
<link rel="import" href="src/standard/utils.html">
<link rel="import" href="src/standard/effectBuilder.html">
<link rel="import" href="src/standard/configure.html">
<link rel="import" href="src/standard/notify-path.html">
<link rel="import" href="src/standard/resolveUrl.html">
<link rel="import" href="src/standard/styling.html">
<link rel="import" href="src/standard/x-styling.html">

<script>

  Polymer.Base._addFeature({

    _registerFeatures: function() {
      // identity
      this._prepIs();
      // attributes
      this._prepAttributes();
      // inheritance
      this._prepExtends();
      // factory
      this._prepConstructor();
      // template
      this._prepTemplate();
      // styles
      this._prepStyles();
      // style properties
      this._prepStyleProperties();
      // template markup
      this._prepAnnotations();
      // accessors
      this._prepEffects();
      // shared behaviors
      this._prepBehaviors();
      // accessors part 2
      this._prepBindings();
      // dom encapsulation
      this._prepShady();
    },

    _prepBehavior: function(b) {
      this._addPropertyEffects(b.properties);
      this._addComplexObserverEffects(b.observers);
      this._addHostAttributes(b.hostAttributes);
    },

    _initFeatures: function() {
      // manage local dom
      this._poolContent();
      // manage configuration
      this._setupConfigure();
      // setup style properties
      this._setupStyleProperties();
      // host stack
      this._pushHost();
      // instantiate template
      this._stampTemplate();
      // host stack
      this._popHost();
      // concretize template references
      this._marshalAnnotationReferences();
      // install host attributes
      this._marshalHostAttributes();
      // setup debouncers
      this._setupDebouncers();
      // concretize effects on instance
      this._marshalInstanceEffects();
      // acquire instance behaviors
      this._marshalBehaviors();
      // acquire initial instance attribute values
      this._marshalAttributes();
      // top-down initial distribution, configuration, & ready callback
      this._tryReady();
    },

    _marshalBehavior: function(b) {
      // establish listeners on instance
      this._listenListeners(b.listeners);
    }

  });

</script>

<link rel="import" href="src/lib/custom-style.html">
<link rel="import" href="src/lib/template/dom-template.html">
<link rel="import" href="src/lib/template/dom-repeat.html">
<link rel="import" href="src/lib/template/array-selector.html">
<link rel="import" href="src/lib/template/dom-if.html">
<link rel="import" href="src/lib/template/dom-bind.html">
